layui.use(['table','jquery','layer','form'], function(){
  var table = layui.table,
  		$ = layui.$;
  //第一个实例
  table.render({
    elem: '#loginTotalList'
    ,height:'380'	
    ,url: $("#contextPath").val() + "/other/loginTotal/queryList" //数据接口
    ,page: true //开启分页
    ,id:'loginTotalList'
    ,cols: [[ //表头
       {type:'numbers',title:"序号"}
       ,{field: 'userName', title: '用户名', width:150,templet:function(d){
    	   if (d.user != null) {
    		   return d.user.userName;
    	   }
       }}
      ,{field: 'brower', title: '浏览器', width:200}
      ,{field: 'os', title: '操作系统', width:150}
      ,{field: 'ip', title: 'IP地址', width:150}
      ,{field: "loginType", title: '登录类型', width:150,templet:function(d){
    	  if (d.loginType == "1") {
    		  return "用户密码登录";
    	  } else {
    		  return "记住我登录";
    	  }
    	  
      }}
      ,{field: 'loginDate', title: '登录时间', width:180,templet:function(d){
    	  return convertDate(d.loginDate,"1");
      }}
    ]]
  });
});